package com.fh.mapper;

import com.fh.entity.po.User;
import com.fh.entity.vo.UserShow;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    @Select("select * from t_user where name = #{name}")
    User getUserByName(String name);

    void addUser(User user);

    @Select("select count(*) from t_user")
    Long queryUserCount();

    @Update("update t_user set password = #{password} where id = #{id}")
    void updatePassword(User userByName);

    List<UserShow> queryUserPageData(com.fh.entity.vo.UserParam param);

    Long queryCount(com.fh.entity.vo.UserParam param);

    @Update("update t_user set sex = #{sex} , areaId = #{areaId} where id = #{id}")
    void updateUserInfo(User user);
}
